import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import RoomList from '../views/RoomList.vue'
import GameRoom from '../views/GameRoom.vue'
import RoleSelect from '../views/RoleSelect.vue'
import GameScript from '../views/GameScript.vue'
import ScriptSelect from '../views/ScriptSelect.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/rooms',
    name: 'RoomList',
    component: RoomList
  },
  {
    path: '/script-select',
    name: 'ScriptSelect',
    component: ScriptSelect
  },
  {
    path: '/room/:id',
    name: 'GameRoom',
    component: GameRoom
  },
  {
    path: '/room/:id/role-select',
    name: 'RoleSelect',
    component: RoleSelect
  },
  {
    path: '/room/:id/game',
    name: 'GameScript',
    component: GameScript
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router

